<template>
  <a-modal
    v-model:visible="props.abnormalVisible"
    title="请选择评阅教师"
    :width="400"
    @cancel="emits('update:abnormalVisible', false)"
    @ok="handleSignAbnormal"
  >
    <div class="p-2">
      <a-row class="pt-10px">
        <a-col :span="24" class="flex">
          <label>重评教师：</label>
          <a-select
            v-model:value="Data.pointPyAccount"
            placeholder="请选择其他教师"
            :options="pySzJsfpList"
            style="width: 100%"
            :field-names="{ label: 'jsxm', value: 'account' }"
          />
        </a-col>
      </a-row>
    </div>
  </a-modal>
</template>

<script setup last="ts">
import { reactive, watch } from 'vue'
const Data = reactive({
  pointPyAccount: null,
})
function handleSignAbnormal() {
  emits('success', 'CP_POINT', Data.pointPyAccount)
  emits('update:abnormalVisible', false)
}
const props = defineProps({
  abnormalVisible: {
    type: Boolean,
    default: false,
  },
  pySzJsfpList: {
    type: Array,
    default: () => [],
  },
})
const emits = defineEmits(['update:abnormalVisible', 'success'])
</script>
